package com.fh.shop.api.order.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
@ApiModel
public class Order implements Serializable {

    @ApiModelProperty(value = "订单ID",example = "0")
    // id 主键的值是，手工设置的
    @TableId(type = IdType.INPUT)
    private String id ;

    @ApiModelProperty(value = "会员id",example = "0")
    private Long memberId ;

    @ApiModelProperty(value = "商品总数量",example = "0")
    private Long totalCount;

    @ApiModelProperty(value = "订单的总价格")
    private BigDecimal totalPrice;

    @ApiModelProperty(value = "收件人Id",required = true)
    private Long recipientId;

    @ApiModelProperty(value = "收件人",required = true)
    private String recipientName;

    @ApiModelProperty(value = "收件人地址",required = true)
    private String recipientAddr;

    @ApiModelProperty(value = "收件人电话",required = true)
    private String recipientPhone;

    @ApiModelProperty(value = "1:支付宝支付 2:微信支付",example = "0")
    private Integer payType;

    @ApiModelProperty(value = "创建日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @ApiModelProperty(value = "支付日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date payTime;

    @ApiModelProperty(value = "发货日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date sendTime;

    @ApiModelProperty(value = "收货日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date receiveTime;

    @ApiModelProperty(value = "订单状态 0:已支付 1:未支付 2:已发货 3:交易成功 4:交易失败",example = "0")
    private Integer orderStatus ;
}
